<extend name="Public/base" />
<!--test--->
<block name="body">
    <p class="" style="color:red;">本页订单，为受理与成功的订单，因此部分只受理的订单不计入总销售额</p>
     <form action="javascript:;" class="search-form" url="{:U('data?flag')}" id="form2" method="get">
        <div class="fr cf" >
                <div class="sleft" style="min-width:80px;">
                    <input type="text" name="currentDayMorningTime" class="text search-input input-large time" value="{$currentDay}" placeholder="请选择开始时间"   style="height: 30px;width:150px" />
                    <input type="text" name="currentDayNightTime" class="text search-input input-large time" value="{$endDay}" placeholder="请选择结束时间"   style="height: 30px;width:150px" />
                    <a class="sch-btn btn btn-primary" href="javascript:;" id="search" url="{:U('daily')}">查询</a>
                </div>
        </div>
     </form>
    <div class="data-table table-striped">
        <table class="table table-hover">
            <thead>
            <tr>
                <th style="">业务员</th>
                <th style="">订单量</th>
                <th style="">订单总价</th>
                <th style="">操作</th>
            </tr>
            </thead>
            <tbody>
            <notempty name="salers">
                <volist name="salers" id="saler">
                    <tr  valign="top">
                        <td>{$saler.sname} </td>
                        <td>{$saler.count} </td>
                        <td>{$saler.sum} </td>
                        <td><a href="{:U('SaleMan/dailydetails')}&sid={$saler['sid']}&currentDayMorningTime={$currentDayMorningTime}&currentDayNightTime={$currentDayNightTime}" class="btn btn-default">明细</a></td>
                    </tr>
                </volist>
                <else/>
                <td colspan="12" class="text-center"> aOh! 暂时还没有内容! </td>
            </notempty>
        </table>
    </div>
    <div class="text-center">
        <button class="btn btn-return" onclick="javascript:history.back(-1);return false;">返 回</button>
    </div>

    <!------左边E------>
    <style>

        .table2 tr th{
            background-color: #F5F5F5;
            font-size: 9px;
            font-weight: normal;
            border: 1px solid #000;
            padding-left: 5px;
        }
        .table2 tr td{
            border: 1px solid #000;
            padding-left: 5px;
            font-weight: bold;
        }
    </style>
</block>
<block name="script">
    <script src="__STATIC__/thinkbox/jquery.thinkbox.js"></script>
    <link href="__STATIC__/datetimepicker/css/datetimepicker.css" rel="stylesheet" type="text/css">
    <php>if(C('COLOR_STYLE')=='blue_color') echo '<link href="__STATIC__/datetimepicker/css/datetimepicker_blue.css" rel="stylesheet" type="text/css">';</php>
    <link href="__STATIC__/datetimepicker/css/dropdown.css" rel="stylesheet" type="text/css">
    <script type="text/javascript" src="__STATIC__/datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
    <script type="text/javascript" src="__STATIC__/datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js" charset="UTF-8"></script>
    <script src="__STATIC__/thinkbox/jquery.thinkbox.js"></script>
    <script type="text/javascript">
        //导航高亮
        highlight_subnav('{:U('SaleMan/daily')}');
        $(function () {
            $('.time').datetimepicker({
                //format: 'yyyy-mm-dd hh:ii',
                format: 'yyyy-mm-dd hh:ii:ss ',
                language: "zh-CN",
                minView: 2,
                autoclose: true
            });
            $(".time").on("change", function () {

            });
            $("#search").click(function () {
                var url = $(this).attr('url');

                var query = $('.search-form').find('input').serialize();
                var queryselect = $('.search-form').find('select').serialize();

                query = query.replace(/(&|^)(\w*?\d*?\-*?_*?)*?=?((?=&)|(?=$))/g, '');
                query = query.replace(/^&/g, '');
                queryselect = queryselect.replace(/(&|^)(\w*?\d*?\-*?_*?)*?=?((?=&)|(?=$))/g, '');
                queryselect = queryselect.replace(/^&/g, '');

                if (url.indexOf('?') > 0) {
                    url += '&' + query;
                    url += '&' + queryselect;
                } else {
                    url += '?' + query;
                    url += '?' + queryselect;
                }
                window.location.href = url;
            });



        });
    </script>
</block>
